package com.bdd.mapper;

import com.bdd.entity.Order;
import com.bdd.entity.OrderItem;
import com.bdd.model.bo.OrderItemBO;
import com.bdd.model.bo.clothing.ClothingBO;
import com.bdd.model.bo.order.OrderItemListBO;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrderItemDao {
    int deleteByPrimaryKey(Integer id);

    int deleteByOrderId(Integer id);

    int insert(OrderItem record);

    int insertSelective(OrderItem record);

    OrderItem selectByPrimaryKey(Integer id);

    OrderItemBO selectBOByPrimaryKey(Integer id);

    OrderItemListBO selectListBOByPKAndSizeId(@Param("clothingId") Integer clothingId,@Param("sizeId") Integer sizeId);

    OrderItem selectByOrderItemId(@Param("orderItemId") Integer orderItemId);

    OrderItemListBO selectBOByOrderItemId(@Param("orderItemId") Integer orderItemId);

    List<OrderItemListBO> selectBOList();

    List<OrderItemListBO> selectBOListByOrderId(@Param("orderId") Integer orderId);

    OrderItem selectByOrderId(@Param("orderId") Integer orderId);

    List<OrderItem> selectAll();

    int updateByPrimaryKeySelective(OrderItem record);

    int updateByPrimaryKey(OrderItem record);

    List<OrderItem> selectByMonth(@Param("month") String month,@Param("cateId")Integer cateId);
}